package com.example.administrator.wallet.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.administrator.wallet.view.activity.find.cointrans.CoinTransactionActivity;

import java.util.List;

/**
 * Effect:
 * <p>
 * Author:  CaiYapeng
 * <p>
 * Time  :  2018/8/20.
 */
public class MyPagerAdapter extends FragmentPagerAdapter{
    private Context context;
    private List<String> tab_datas;
    private List<Fragment> pager_datas;
    public MyPagerAdapter(CoinTransactionActivity coinTransactionActivity, List<String> tab_datas, List<Fragment> pager_datas) {
        super(coinTransactionActivity.getSupportFragmentManager());
        this.tab_datas=tab_datas;
        this.pager_datas=pager_datas;
    }

    @Override
    public int getCount() {
        return tab_datas.size();
    }

    @Override
    public Fragment getItem(int position) {
        return pager_datas.get(position);
    }



    @Override
    public CharSequence getPageTitle(int position) {
        return tab_datas.get(position);
    }
}
